package org.example.aggregation.dto;

public class DogDto implements AggregationDto<Integer,DogDto>{

    private Integer id;
    private String name;

    public DogDto(Integer id, String name){
        this.id = id;
        this.name = name;
    }

    @Override
    public Integer uniqueKey() {
        return this.id;
    }

    @Override
    public DogDto concat(DogDto a) {
        if(a == null){
            return this;
        }
        this.name = this.name + a.name;
        return this;
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }
}
